Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RabbitMQ: Specify how to populate messaging.destination.name #1531

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

joaopgrassi
Copy link
Member

@joaopgrassi joaopgrassi commented Oct 30, 2024

Fixes #1529

Changes

Specify in more detail how to populate messaging.destination.name for RabbitMQ. I based it on the Default exchange docs. My understanding is that a routing key is always present, even when using the default exchange (empty in this case). The routing key then is the queue name.

For all other cases, I left it as amq.default which is what RabbitMQ uses. I saw reference for it for example here: https://www.rabbitmq.com/docs/access-control

For convenience RabbitMQ maps AMQP 0-9-1's default exchange's blank name to 'amq.default' when performing permission checks.

Merge requirement checklist

docs/messaging/rabbitmq.md Outdated Show resolved Hide resolved
docs/messaging/rabbitmq.md Outdated Show resolved Hide resolved
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 29, 2024
@joaopgrassi joaopgrassi requested a review from a team as a code owner November 29, 2024 07:28
@github-actions github-actions bot removed the Stale label Nov 30, 2024
@joaopgrassi joaopgrassi requested a review from lmolkova December 2, 2024 09:20
Copy link
Contributor

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some small suggestions

docs/messaging/rabbitmq.md Outdated Show resolved Hide resolved
docs/messaging/rabbitmq.md Outdated Show resolved Hide resolved
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this text instead be part of rabbitmq yaml for messaging.destination.name?

@joaopgrassi
Copy link
Member Author

should this text instead be part of rabbitmq yaml for messaging.destination.name?

Good point, I didn't consider it but maybe it makes sense 🤔

@joaopgrassi
Copy link
Member Author

@trask I moved the text to the yaml file instead in f48427f. I think it makes more sense.

@lmolkova what do you think?

@joaopgrassi joaopgrassi requested a review from lmolkova December 16, 2024 15:16
Copy link
Contributor

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

model/messaging/spans.yaml Outdated Show resolved Hide resolved
`messaging.destination.name` SHOULD be set to:

- **Producers**: `{exchange}:{routing key}` when both values are present and non-empty.
Otherwise: `amq.default` when the default exchange is used and no routing key is provided
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can there be an {exchange} but not a {routing key}, or can there be a {routing key} but not a {exchange}? it may be helpful to be explicit about fallback options (if any), in particular, do you drop the : or not when only one of them is present, here's an example where we cover these fallbacks: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md#name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah they can be empty like that AFAIK. I adapted it a bit, hopefully it is clearer now.

model/messaging/spans.yaml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs More Approval
Development

Successfully merging this pull request may close these issues.

[Messaging RabbitMQ] What to use for destination.name when the default exchange is used (empty string)
3 participants